﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Entity;

namespace BIZ
{
    public class Category_eventBIZ
    {
        Category_eventDAL DAL = new Category_eventDAL();

        //---------------------Category_eventSearchById-----------------------------
        public List<objCategory_event> Category_eventSearchById(int id)
        {
            try
            {
                List<objCategory_event> lst = new List<objCategory_event>();
                lst = DAL.Category_eventSearchById(id);

                return lst;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Category_eventInsert-----------------------------
        public int Category_eventInsert(string name, string content_template)
        {
            try
            {
                int i = DAL.Category_eventInsert(name, content_template);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Category_eventUpdate-----------------------------
        public int Category_eventUpdate(int id, string name, string content_template)
        {
            try
            {
                int i = DAL.Category_eventUpdate(id, name, content_template);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Category_eventDelete-----------------------------
        public int Category_eventDelete(int id)
        {
            try
            {
                int i = DAL.Category_eventDelete(id);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
